#include<stdio.h>
int main()
{
	int num1 = 0;
	int num2 = 0;
	scanf_s("%d%d", &num1, &num2);
	int a, b, c;
	a = num1 & num2;
	b = num1 | num2;
	c = num1 ^ num2;
	printf("%d %d %d", a, b, c);
	return 0;
}